home *** CD-ROM | disk | FTP | other *** search
/ Delphi 5 for Professionals / DELPHI5.iso / AddOns / Components / Cell Control / DATA1.CAB / VCDEMO_Files / DropwinDlg.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-11  |  1.9 KB  |  68 lines

  1. // DropwinDlg.cpp : implementation file
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "VCDemo.h"
  6. #include "DropwinDlg.h"
  7.  
  8. #ifdef _DEBUG
  9. #define new DEBUG_NEW
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CDropwinDlg dialog
  16.  
  17.  
  18. CDropwinDlg::CDropwinDlg(CWnd* pParent /*=NULL*/)
  19.     : CDialog(CDropwinDlg::IDD, pParent)
  20. {
  21.     //{{AFX_DATA_INIT(CDropwinDlg)
  22.         // NOTE: the ClassWizard will add member initialization here
  23.     //}}AFX_DATA_INIT
  24. }
  25.  
  26.  
  27. void CDropwinDlg::DoDataExchange(CDataExchange* pDX)
  28. {
  29.     CDialog::DoDataExchange(pDX);
  30.     //{{AFX_DATA_MAP(CDropwinDlg)
  31.     DDX_Control(pDX, IDC_SGCTRL1, m_ctrl);
  32.     //}}AFX_DATA_MAP
  33. }
  34.  
  35. /////////////////////////////////////////////////////////////////////////////
  36. // CDropwinDlg message handlers
  37.  
  38. BOOL CDropwinDlg::OnInitDialog() 
  39. {
  40.     CDialog::OnInitDialog();
  41.     
  42.     // TODO: Add extra initialization here
  43.     m_ctrl.DoSetCellString( 0, 1, "Button");
  44.     m_ctrl.DoSetCellString( 0, 3, "Check box");
  45.     m_ctrl.DoSetCellString( 0, 5, "Drop window(row select only)");
  46.     m_ctrl.DoSetCellString( 0, 7, "Drop window");
  47.     m_ctrl.DoSetCellString( 0, 9, "Drop window(data from page2)");
  48.     
  49.  
  50.     m_ctrl.DoSetButtonCell( 2, 1, "press me", "You press here!");
  51.     m_ctrl.DoSetCheckboxCell( 2, 3, "Check box");
  52.     m_ctrl.DoSetDropGridCell( 2, 5, 0, 0, 5, 5, 0, 1, 0, 0, 0 );
  53.     m_ctrl.DoSetDropGridCell( 2, 7, 0, 0, 5, 5, 0, 0, 0, 0, 0 );
  54.     m_ctrl.DoSetDropGridCell( 2, 9, 0, 0, 5, 5, 1, 0, 0, 0, 0 );
  55.  
  56.     m_ctrl.DoAppendPage( "", 1 );
  57.     m_ctrl.DoSetCurrentPage( 1 );
  58.     m_ctrl.DoSetCellString( 0, 1, "data from");
  59.     m_ctrl.DoSetCellString( 0, 2, "page 2");
  60.     m_ctrl.DoSetCurrentPage( 0 );
  61.  
  62.     COleVariant var( "VCDEMO" );
  63.     m_ctrl.DoSetMessageTitle( var );
  64.     return TRUE;  // return TRUE unless you set the focus to a control
  65.                   // EXCEPTION: OCX Property Pages should return FALSE
  66. }
  67.  
  68.